{% extends "layout.html" %}
{% block content %}
    <h1>Finished</h1>
    <p>Here is the result of the matching:</p>
    <div class="content-section">
        <div class="row">
            <video width="100%" height="100%" controls>
                <source src="{{'static/results/' + result}}" type="video/mp4">
                Your browser does not support the video tag.
            </video>
        </div>
        <div class="row" style="padding: 10px 20px 0px 20px">
            <a class="btn btn-outline-primary" href="{{ url_for('download_result', filename='result') }}" style="width: 100%">Download result</a>
        </div>
    </div>
    {% for video in video_names %}
        {% if video.source == '' %}
            <p>The {{video.number}}video used is called "{{video.name}}":</p>
        {% else %}
            <p>The {{video.number}}video used is called "{{video.name}}" ({{video.source}}):</p>
        {% endif %}
        <div class="content-section">
            <form class="form-inline" style="padding-left: 0px; margin-right:0px">
                <video width="100%" height="100%" controls>
                    <source src="{{'static/datasets/video/' + video.name + '.mp4'}}" type="video/mp4">
                    Your browser does not support the video tag.
                </video>
            </form>
            <div class="row" style="padding-top: 10px">
                <a class="btn btn-outline-primary" href="{{ url_for('download_video', filename=video.name+'.mp4') }}" style="width: 100%">Download video</a>
            </div>
        </div>
    {% endfor %}
{% endblock content %}
